<?php  if ( ! defined('BASEPATH')) exit('No direct script access allowed');
    #############################################################################################
    # Programmer: นวัตพล ยศกำธร     						                        #
    # Email : golf.enfc40@gmail.com								#
    # Website : http://www.nawattapon.com							#
    #############################################################################################
    
    if ( ! function_exists('facebook_share')){
        function facebook_share($group_id , $zone , $action){
            
        }
    }
    
    if ( ! function_exists('facebook_connect')){
        function facebook_connect($group_id , $zone , $action){
            
        }
    }
    
    if(!function_exists('facebook_like')){
        function facebook_like($url){
            $formlink  = '<iframe src="http://www.facebook.com/plugins/like.php?href=';
            $formlink .= urlencode($url);
            $formlink .= ';layout=button_count&show_faces=true&width=450&';
            $formlink .= 'action=like&colorscheme=light&height=21" scrolling="no"';
            $formlink .= 'frameborder="0" style="border:none; overflow:hidden;';
            $formlink .= 'width:450px;height:21px;" allowTransparency="true"></iframe>';
            return $formlink;
        }
    }
    
    if(!function_exists('facebook_is_like')){
        function facebook_is_like($url){
            
        }
    }
    
    if(!function_exists('facebook_xmlns')){
	function facebook_xmlns()
	{
	    return 'xmlns:fb="http://www.facebook.com/2008/fbml" xmlns:og="http://www.facebook.com/2008/fbml" xmlns:og="http://opengraphprotocol.org/schema/"';
	}
    }
    
    if(!function_exists('facebook_app_id')){
	function facebook_app_id()
	{
	    $ci =& get_instance();
	    return $ci->config->item('facebook_app_id');
	}
    }
    
    if(!function_exists('facebook_picture')){
	function facebook_picture($who = 'me')
	{
	    $ci =& get_instance();
	    return $ci->facebook->append_token($ci->config->item('facebook_api_url').$who.'/picture');
	}
    }
    
    if(!function_exists('facebook_opengraph_meta')){
	function facebook_opengraph_meta($opengraph)
	{
	    $ci =& get_instance();
	    
	    $return = '<meta property="fb:admins" content="'.$ci->config->item('facebook_admins').'" />';
	    $return .= "\n";
	    $return .= '<meta property="fb:app_id" content="'.$ci->config->item('facebook_app_id').'" />';
	    $return .= "\n";
	    $return .= '<meta property="og:site_name" content="'.$ci->config->item('facebook_site_name').'" />';
	    $return .= "\n";	 
	    
	    foreach ( $opengraph as $key => $value ){
		$return .= '<meta property="og:'.$key.'" content="'.$value.'" />';
		$return .= "\n";
	    }
	    
	    return $return;
	}
    }
    
/* End of file project_helper.php */
/* Location: ./application/helpers/project_helper.php */